Skip to content

test: Add test project for arrow-optics with Maven configuration and sample tests #63#67

Merged
kpavlov merged 1 commit intomainfrom
arrow-optics-example
Feb 20, 2026
Merged

test: Add test project for arrow-optics with Maven configuration and sample tests #63#67
kpavlov merged 1 commit intomainfrom
arrow-optics-example

Conversation

@kpavlov
Copy link
Owner

@kpavlov kpavlov commented Feb 20, 2026

Add test project for arrow-optics with Maven configuration and sample tests #63

  • Introduced test-projects/arrow-optics with initial Maven setup (An example with Arrowkt Optics #63). Added Person and Address data classes with optics annotations.
  • Implemented tests to validate optics code generation.
  • Updated KSP plugin version in sample-project pom.xml to 0.3.2.
  • Enhanced Makefile to include arrow-optics project testing.

Description

🎯 What's the purpose of this PR?

To verify #63


🏔️ PR Size Check

Estimated lines changed:

  • 🟢 Small (< 200 lines)—Quick reviews

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • ♻️ Refactoring (no functional changes)
  • 🎨 Code style/formatting update
  • ⚡ Performance improvement
  • ✅ Test addition or update
  • 🔧 Configuration change
  • 🗑️ Code removal/cleanup

🧪 How Has This Been Tested?

Testing checklist:

  • 🧪 Unit tests added/updated
  • 🚀 Integration tests added/updated
  • 👌 Manual testing performed
  • ✅ All existing tests pass locally

…sample tests #63

- Introduced `test-projects/arrow-optics` with initial Maven setup (#63). Added `Person` and `Address` data classes with optics annotations.
- Implemented tests to validate optics code generation.
- Updated KSP plugin version in `sample-project` pom.xml to 0.3.2.
- Enhanced Makefile to include arrow-optics project testing.
@kpavlov kpavlov marked this pull request as ready for review February 20, 2026 22:07
@kpavlov kpavlov merged commit 5cac706 into main Feb 20, 2026
4 checks passed
@kpavlov kpavlov deleted the arrow-optics-example branch February 20, 2026 22:07
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated KSP Maven plugin dependency.
    • Added new test project for Arrow Optics integration.
    • Enhanced CI pipeline to include additional test coverage.

Walkthrough

A new Arrow Optics test project is introduced alongside build system updates. The Makefile is modified to include test execution for the new project. The KSP Maven plugin dependency is upgraded to version 0.3.2, and a complete test project with POM configuration, sample Kotlin code, and test cases is added.

Changes

Cohort / File(s) Summary
Build Configuration Updates
Makefile, sample-project/pom.xml
Makefile adds sequential test execution for arrow-optics test project; KSP Maven plugin version updated from 0.3.0 to 0.3.2.
Arrow Optics Test Project
test-projects/arrow-optics/pom.xml, test-projects/arrow-optics/src/main/kotlin/com/example/Person.kt, test-projects/arrow-optics/src/test/kotlin/com/example/PersonOpticsTest.kt
New Maven test project structure with POM configuration defining Kotlin, Arrow, and KSP plugin setup. Introduces data classes (Person, Address) annotated with @optics for Arrow codegen. Test cases validate generated lenses for property access, modification, composition, and nested field updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch arrow-optics-example

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant